<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <title>QRServer--二维码生成器</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="QRServer,二维码生成器">
        <meta name="author" content="Magine">
        <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
        <link href="http://cdn.bootcss.com/bootstrap-select/1.4.1/bootstrap-select.min.css" rel="stylesheet">
        <style>
            body {
            padding-top: 40px;
            padding-bottom: 40px;
            background-color: #f5f5f5;
            }
            .form-signin {
                max-width: 400px;
                padding: 19px 29px 29px;
                margin: 0 auto 20px;
                background-color: #fff;
                border: 1px solid #e5e5e5;
                -webkit-border-radius: 5px;
                -moz-border-radius: 5px;
                border-radius: 5px;
                -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                box-shadow: 0 1px 2px rgba(0,0,0,.05);
            }
            .form-signin input[type="text"],
            .form-signin input[type="password"] {
                font-size: 16px;
                height: auto;
                margin-bottom: 15px;
                padding: 7px 9px;
            }
        </style>
    </head>

    <body>
        <div id="container" class= "container">
            <center><h1>设备二维码生成器</h1></center>
            <hr>
            <form method="post" accept-charset="utf-8" class="form-signin">
                {% csrf_token %}
                <input type="text" name="num" class="form-control" placeholder="设备编号" autofocus/>
                {% if error_message %}
                    <span style="color: #ff0000;"><center>{{ error_message }}</center></span>
                {% else %}
                    {% load qr_tags %}
                    <center>{% qr_from_text uncode %}</center>
                {% endif %}
                <center>
                    <button type="submit" class="btn btn-primary" style="width: 100px; margin-right: 15px;">生&nbsp;&nbsp;成</button>
                    <a href="{% url 'index' %}">
                        <button type="button" class="btn btn-primary" style="width: 100px;">返&nbsp;&nbsp;回</button>
                    </a>
                </center>
            </form>
        </div>
    </body>
</html>
